<template>
  <div class="firm-box">
    <top :msg="this.$route.path"></top>
    <!-- 中间列表 -->
    <div class="wrap-head-box">
      <div class="nav-list-box">
        <ul class="nav-ul">
          <li v-for="(item,index) in list" :key="index">
            <span class="nav-list-title">{{item.name}}：</span>
            <span class="nav-list-content" :class='arry[index]==item2?"sty":""' v-for="(item2,index2) in item.value" :key="index2" @click="nav(item2,index)">{{item2}}</span>
          </li>
        </ul>
      </div>
      <!-- 排序方式 -->
      <div class="sortord-box">
        <span class="nav-list-title">{{sortord.name}}：</span>
        <span class="nav-list-content" :class='array2==items?"sty":""' @click="sortords(items)" v-for="(items,index3) in sortord.value" :key="index3">{{items}}</span>
      </div>

      <p class="recommend-title">推荐>></p>

      <div class="wrap-post-box">
        <div class="post-box" v-for="(post1,inpost) in post" :key="inpost">
          <div class="wrap-post ">
            <div class="post-img">
              <img :src="post1.img">
            </div>
            <div class="post-content">
              <p>{{post1.name}}</p>
              <p class="intro-title">{{post1.intro}}</p>
            </div>

          </div>
          <div class="post-bottom">
            热招
            <p>{{post1.post}}</p>{{post1.pay}}
          </div>
        </div>
      </div>
    </div>
    <bottom></bottom>
  </div>
</template>
<script>
import bottom from "./bottom";
import top from "./top";

export default {
  components: { bottom, top },

  data() {
    return {
      list: [
        {
          name: "公司地点",
          value: ["全国", "上海", "深圳", "北京", "成都", "东莞", "广州"]
        },
        {
          name: "融资阶段",
          value: ["不限", "上海", "深圳", "北京", "成都", "东莞", "广州"]
        },
        {
          name: "公司规模",
          value: ["不限", "上海", "深圳", "北京", "成都", "东莞", "广州"]
        },
        {
          name: "行业领域",
          value: ["不限", "上海", "深圳", "北京", "成都", "东莞", "广州"]
        }
      ],
      arry: [],
      sortord: {
        name: "排序方式",
        value: ["默认排序", "职位数量", "面试评价数", "简历处理率"]
      },
      post: [
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        },
        {
          name: "字节跳动",
          img: "../../static/img/banner1.jpg",
          pay: "10K-15K",
          post: "前端开发技术",
          intro: "不需要融资|家具/家电"
        }
      ],
      array2: ""
    };
  },
  methods: {
    nav(val, index) {
      this.$set(this.arry, index, val);
    },
    sortords(i) {
      this.array2 = i;
    }
  },
  mounted() {
    for (let i = 0; i < this.list.length; i++) {
      this.arry.push(this.list[i].value[0]);
    }

    this.array2 = this.sortord.value[0];
  }
};
</script>
<style scoped>
.firm-box {
  background: #fafafa;
}
p {
  margin: 0px;
  padding: 0px;
}
.wrap-head-box {
  max-width: 1200px;
  margin: 0 auto;
  /* border: 1px solid red; */
  margin-top: 30px;
  overflow: hidden;
}
.nav-list-box {
  width: 100%;
  background: #fff;
  padding: 20px 15px;
  box-sizing: border-box;
}
.sty {
  background: #00bfff;
  color: #fff;
}
.nav-list-content {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 5px;
  cursor: pointer;
}
.nav-list-content:hover {
  background: #00bfff;
  color: #fff;
}
.nav-list-title {
  font-size: 17px;
  font-weight: 700;
}
.nav-ul li {
  margin: 5px 0px;
}
/* 排序方式 */
.sortord-box {
  margin-top: 35px;
  background: #fff;
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  padding: 0px 20px;
  display: flex;
  align-items: center;
}
.recommend-title {
  font-weight: 500;
  font-size: 19px;
  margin-top: 60px;
}
/* 推荐公司 */
.post-box {
  background: #fff;
  width: 23.4%;
  min-height: 100px;
  /* border: 1px solid red; */
  padding: 0px 20px;
  box-sizing: border-box;
  float: left;
  margin: 10px 9px;
  box-shadow: 5px 5px 5px #ccc;
}
.post-img {
  width: 100px;
  height: 60px;
  float: left;
}
.post-img img {
  width: 100%;
  height: 100%;
}
.post-content {
  float: right;
  text-align: right;
}
.intro-title {
  height: 40px;
  line-height: 41px;
  color: #898e9d;
  font-size: 12px;
  display: inline-block;
  white-space: nowrap;
}
.wrap-post {
  margin-top: 15px;
}
.wrap-post::after {
  content: "";
  clear: both;
  display: block;
}
.el-divider--horizontal {
  margin: 10px;
}
.post-bottom p {
  color: #00c2b3;
  text-decoration: none;
  display: inline-block;
  vertical-align: top;
  max-width: 145px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.post-bottom {
  border-top: 1px solid #ccc;
  height: 30px;
  line-height: 30px;
  margin-top: 24px;
  color: #8d92a1;
  font-size: 12px;
}
.post-box {
  transition: all 0.5s;
}
.post-box:hover {
  transform: scale(1.1);
}
</style>

